package com.mao.service.impl.warehouse;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mao.action.jsonvo.warehouse.JsonVoWareHouse;
import com.mao.dao.warehouse.WareHouseDao;
import com.mao.model.warehouse.WareHouse;
import com.mao.service.warehouse.IWareHouseService;

@Service("wareHouseService")
public class WareHouseServiceImpl implements IWareHouseService {
	private WareHouseDao wareHouseDao;

	public List<WareHouse> getAllWareHouse() {
		return wareHouseDao.getAllWareHouse();
	}

	public WareHouse saveWareHouse(WareHouse w) {
		return wareHouseDao.saveWareHouse(w);
	}

	public WareHouse updateWareHouse(WareHouse w) {
		return wareHouseDao.updateWareHouse(w);
	}

	public WareHouse getWareHouseById(long id) {
		return wareHouseDao.getWareHouseById(id);
	}
	
	public List<JsonVoWareHouse> getWarsByWarClass(WareHouseCondition wareHouseCondition, long warClassId,long storeid,Integer page,Integer rows){
		return wareHouseDao.getWarsByWarClass(wareHouseCondition, warClassId,storeid,page,rows);
	}
	
	public int getWarsByWarClassgCount(WareHouseCondition wareHouseCondition, long warClassId,long storeid){
		return wareHouseDao.getWarsByWarClassCount(wareHouseCondition, warClassId,storeid);
	}
	
	public String valDelWH(long id){
		return wareHouseDao.valDelWH(id);
	}

	public WareHouseDao getWareHouseDao() {
		return wareHouseDao;
	}
	
	@Autowired
	public void setWareHouseDao(WareHouseDao wareHouseDao) {
		this.wareHouseDao = wareHouseDao;
	}
	
	
}
